USE [i8office]
GO

if (exists (select * from sys.objects where name = 'proc_wkf_messagehandle'))
	drop proc proc_wkf_messagehandle
go
create proc proc_wkf_messagehandle(
	@MessageID nvarchar(36),
	@UserID nvarchar(32),
	@NodeName nvarchar(100)
)
as
	INSERT INTO [dbo].[WKF_MessageHandle]
           ([MessageID]
           ,[NodeKey]
           ,[UserID]
           ,[NodeName]
           ,[CreateTime]
           ,[HandleStatus]
           ,[HandleType]
           ,[ProcType]
           ,[EntrustBy]
           ,[Memo]
           ,[ActivatedByNodes]
           ,[ActivatedReason]
           ,[SendBackThenReturnTo])
     VALUES
           (@MessageID
           ,'NODE0002'
           ,@UserID
           ,@NodeName
           ,GETDATE()
           ,1
           ,0
           ,0
           ,''
           ,''
           ,'NODE0001'
           ,0
           ,'')